#include <U8g2lib.h>
#include <Arduino_GFX_Library.h>

Arduino_DataBus *bus = new Arduino_HWSPI(PB4 /* DC */);
Arduino_GFX *gfx = new Arduino_ST7735(
  bus, GFX_NOT_DEFINED /* RST */, 0 /* rotation */, false /* IPS */,
  128 /* width */, 128 /* height */,
  2 /* col offset 1 */, 3 /* row offset 1 */,
  2 /* col offset 2 */, 1 /* row offset 2 */);

void setup() {
  SPI.setMOSI(PB5);
  SPI.setSCLK(PB3);
  SPI.setSSEL(PA15);
  gfx->begin();
  gfx->fillScreen(BLACK);
  gfx->setCursor(10, 50);
  gfx->setFont(u8g2_font_commodore64_tr);
  gfx->setTextColor(GREEN);
  gfx->println("Hello, world!");
}

void loop() {
  // put your main code here, to run repeatedly:

}
